package doc2db.interfaces.xmledit;

import doc2db.Launcher;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JToolBar;

/**
 *
 * @author yura
 */
public class XmlEditorTolBar extends JToolBar {
     private JButton save = new JButton(Launcher.getIcon("tolBar/save.png"));

    public XmlEditorTolBar(ActionListener chek, ActionListener test, ActionListener hlp) {
        super(JToolBar.HORIZONTAL);
        JButton chekXML = new JButton(Launcher.getIcon("tolBar/chekXML.png"));
        JButton testLex = new JButton(Launcher.getIcon("tolBar/testLex.png"));
        JButton help = new JButton(Launcher.getIcon("tolBar/help.png"));
        chekXML.addActionListener(chek);
        testLex.addActionListener(test);
        help.addActionListener(hlp);

        add(save);
        add(chekXML);
        add(testLex);
        add(help);
    }

    public void addSaveAction(ActionListener l) {
        save.addActionListener(l);
    }
    
}
